<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../../lib/layui-v2.6.3/css/layui.css" media="all">
    <link rel="stylesheet" href="../../css/public.css" media="all">
    <link rel="stylesheet" href="../../lib/jq-module/zyupload/zyupload-1.0.0.min.css" media="all">
    <style>
        body {
            background-color: #ffffff;
        }

    </style>
</head>
<body>
<div class="layui-form" lay-filter="personalInfo-form">
    <div class="layui-form-item">
        <label class="layui-form-label">用户ID</label>
        <div class="layui-input-block">
            <input type="text" name="userId" lay-verify="required" value="" class="layui-input" readonly>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">用户昵称</label>
            <div class="layui-input-inline">
                <input type="text" name="userName" lay-verify="required" value="" class="layui-input" readonly>
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">真实姓名</label>
            <div class="layui-input-inline">
                <input type="text" name="realName" lay-verify="required" value="" class="layui-input" readonly>
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">性别</label>
            <div class="layui-input-inline">
                <input type="text" name="sex" lay-verify="required" value="" class="layui-input" readonly>
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">年龄层</label>
            <div class="layui-input-inline">
                <input type="text" name="ageGroup" lay-verify="required" value="" class="layui-input" readonly>
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">个人身份</label>
            <div class="layui-input-inline">
                <input type="text" name="identityJob" lay-verify="required" value="" class="layui-input" readonly>
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">手机号码</label>
            <div class="layui-input-inline">
                <input type="text" name="phoneNumber" lay-verify="required" value="" class="layui-input" readonly>
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">所在地区</label>
            <div class="layui-input-inline">
                <input type="text" name="region" lay-verify="required" value="" class="layui-input" readonly>
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">收货地址</label>
            <div class="layui-input-inline">
                <input type="text" name="address" lay-verify="required" value="" class="layui-input" readonly>
            </div>
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">测评喜好主品类</label>
            <div class="layui-input-inline">
                <input type="text" name="mainCategory" lay-verify="required" value="" class="layui-input" readonly>
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">测评喜好副品类</label>
            <div class="layui-input-inline">
                <input type="text" name="secondCategory" lay-verify="required" value="" class="layui-input" readonly>
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">月收入</label>
            <div class="layui-input-inline">
                <input type="text" name="monthlyIncome" lay-verify="required" value="" class="layui-input" readonly>
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">兴趣领域</label>
            <div class="layui-input-inline">
                <input type="text" name="interests" lay-verify="required" value="" class="layui-input" readonly>
            </div>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">街道乡镇</label>
        <div class="layui-input-block">
            <input type="text" name="streetVillage" lay-verify="required" value="" class="layui-input" readonly>
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">抖音平台</label>
            <div class="layui-input-inline">
                <input type="text" name="tiktok" lay-verify="required" value="" class="layui-input" readonly>
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">抖音粉丝数</label>
            <div class="layui-input-inline">
                <input type="text" name="tiktokFans" lay-verify="required" value="" class="layui-input" readonly>
            </div>
        </div>

        <div class="layui-inline">
            <label class="layui-form-label">抖音获赞数</label>
            <div class="layui-input-inline">
                <input type="text" name="tiktokLikes" lay-verify="required" value="" class="layui-input" readonly>
            </div>
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">小红书平台</label>
            <div class="layui-input-inline">
                <input type="text" name="littleRedBook" lay-verify="required" value="" class="layui-input" readonly>
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">小红书粉丝数</label>
            <div class="layui-input-inline">
                <input type="text" name="littleRedBookFans" lay-verify="required" value="" class="layui-input" readonly>
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">小红书获赞与收藏数</label>
            <div class="layui-input-inline">
                <input type="text" name="littleRedBookLikes" lay-verify="required" value="" class="layui-input"
                       readonly>
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">其他社交平台</label>
            <div class="layui-input-inline">
                <input type="text" name="otherPlatforms" lay-verify="required" value="" class="layui-input" readonly>
            </div>
        </div>

        <div class="layui-inline">
            <label class="layui-form-label">是否愿意为平台分销商品赚取佣金</label>
            <div class="layui-input-inline">
                <input type="text" name="willingDistribute" lay-verify="required" value="" class="layui-input" readonly>
            </div>
        </div>

        <div class="layui-inline">
            <label class="layui-form-label">测评师等级</label>
            <div class="layui-input-inline">
                <input type="text" name="evaluationGrade" lay-verify="required" value="" class="layui-input" readonly>
            </div>
        </div>
    </div>
</div>
<script src="../../lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
<script src="../../lib/common/common.js" charset="utf-8"></script>
<script src="../../lib/jquery-3.4.1/jquery-3.4.1.min.js" charset="utf-8"></script>
<script>

    window.onload = function () {
        let id = GetQueryString("id");
        if (isNotNull(id)) {
            init(id);
        } else {
            const iframeIndex = parent.layer.getFrameIndex(window.name);
            parent.layer.close(iframeIndex);
        }
    }

    /**
     * 初始化数据
     */
    function init(id) {
        $.ajax({
            type: "GET",
            url: `/personalInfo/info/${id}`,
            dataType: 'json',
            contentType: 'application/x-www-form-urlencoded',
            success: function (req) {
                layui.use(['form'], function () {
                    let form = layui.form;
                    form.render();
                    const data = req.data;
                    form.val('personalInfo-form', {
                        "userId": data?.userId,
                        "userName": data?.userName,
                        "realName": data?.realName,
                        "sex": data?.sex,
                        "ageGroup": data?.ageGroup,
                        "identityJob": data?.identityJob,
                        "phoneNumber": data?.phoneNumber,
                        "region": data?.region,
                        "address": data?.address,
                        "mainCategory": data?.mainCategory,
                        "secondCategory": data?.secondCategory,
                        "monthlyIncome": data?.monthlyIncome,
                        "interests": data?.interests,
                        "streetVillage": data?.streetVillage,
                        "tiktok": data?.tiktok,
                        "tiktokFans": data?.tiktokFans,
                        "tiktokLikes": data?.tiktokLikes,
                        "littleRedBook": data?.littleRedBook,
                        "littleRedBookFans": data?.littleRedBookFans,
                        "littleRedBookLikes": data?.littleRedBookLikes,
                        "otherPlatforms": data?.otherPlatforms,
                        "willingDistribute": data?.willingDistribute,
                        "evaluationGrade": data?.evaluationGrade
                    });
                })
            },
            error: function (e) {
                layer.msg("数据有误");
            }
        })
    }
</script>
</body>
</html>